﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sundry.Model
{
    public class PromptModel
    {
        public PromptModel(string message)
        {
            CountdownTime = 5;
            CountdownModel = 0;
            BackUrl = "";
            Message = message;
            IsShowBackLink = false;
            IsAutoBack = false;
        }

        public PromptModel(string backUrl, string message)
        {
            IsAutoBack = true;
            IsShowBackLink = true;
            CountdownTime = 5;
            CountdownModel = 0;
            BackUrl = backUrl;
            Message = message;
        }

        /// <summary>
        /// 返回地址
        /// </summary>
        public string BackUrl { get; set; }

        /// <summary>
        /// 提示信息
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// 倒计时模型
        /// </summary>
        public int CountdownModel { get; set; }

        /// <summary>
        /// 倒计时时间
        /// </summary>
        public int CountdownTime { get; set; }

        /// <summary>
        /// 是否显示返回地址
        /// </summary>
        public bool IsShowBackLink { get; set; }

        /// <summary>
        /// 是否自动返回
        /// </summary>
        public bool IsAutoBack { get; set; }
    }
}
